package com.wicketFlowTester.framework;

import org.apache.wicket.util.file.File;
import org.apache.wicket.util.tester.FormTester;

public class FormTesterFacadeImpl implements FormTesterFacade{
    
    final FormTester formTester;
    
    /**
     * @param formTester
     */
    public FormTesterFacadeImpl(FormTester formTester) {
        this.formTester = formTester;
    }

    public void setValue(String formComponentId, String value) {
        formTester.setValue(formComponentId, value);
    }
    
    public void setValue(String checkBoxId, boolean checked) {
        formTester.setValue(checkBoxId, checked);
    }

    public void select(String formComponentId, int index) {
        formTester.select(formComponentId, index);
    }

    public void selectMultiple(String formComponentId, int[] indexes) {
        formTester.selectMultiple(formComponentId, indexes);
    }

    public void submit() {
        formTester.submit();
    }

    public void submit(String buttonComponentId) {
        formTester.submit(buttonComponentId);
    }

    public void setFile(String formComponentId, File file, String contentType) {
        formTester.setFile(formComponentId, file, contentType);
    }

}
